shell/app: Be extra careful when applying GPU environment
We get the environment from SwitcherooControl as an array of
key-value pairs. When applying it, we loop over the array in pairs,
assuming that every key has a value.
While this is the expected format, it does not hurt to be defensive
against possible bugs in the service, so explicitly check that both
key and value are non-NULL before applying them.